﻿using Coolzon.UI.Core.Parts.Widgets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coolzon.UI.Core.Runtime.Script
{
    public class LabelScriptObject : PartScriptObject
    {
        public LabelScriptObject(Label label)
            :base(label)
        {

        }
        public string Text
        {
            get
            {
                Label label = GetTarget<Label>();
                if (label != null)
                    return label.Text;
                return null;
            }
            set
            {
                Label label = GetTarget<Label>();
                if (label != null)
                    label.Text = value;
            }
        }

        public string Image
        {
            get
            {
                Label label = GetTarget<Label>();
                if (label != null)
                    return label.Image;
                return null;
            }
            set
            {
                Label label = GetTarget<Label>();
                if (label != null)
                    label.Image = value;
            }
        }
    }
}
